<template>
    <div class="container">
        <div class="menu" style="text-align:right;">
            <el-dropdown  @command="handleCommand">
                <el-button type="primary">
                请选择<i class="el-icon-arrow-down el-icon--right"></i>
                </el-button>
                <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item command="company">公司信息修改</el-dropdown-item>
                    <el-dropdown-item command="message">消息</el-dropdown-item>
                </el-dropdown-menu>
            </el-dropdown>
        </div>
    </div>
</template>
<style scoped>
    .container{
        width: 750px;
        margin: 20px auto;
        background-color: white;
        padding: 20px 30px;
        height: 650px;
        box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
    }
</style>

<script>
  export default {
    data(){
        return{
            account:''
        }
    },
    methods: {
      handleCommand(command) {
        const that=this;
        this.account=this.$route.params.account;
        if(command=="company"){
            that.$router.push({path:'/InfoModify'});
        }
        else if(command=="message"){
            that.$router.push({name:'Message',params:{account:this.account}});
        }
      }
    }
  }
</script>